game:loadLayoutGUI("mapSelection.layout")
game:loadLayoutGUI("menuLayout.layout")
game:loadLayoutGUI("gameoverLayout.layout")
game:loadLayoutGUI("loadingLayout.layout")


game:setWindowVisible("MenuWindow",true)

game:bindFunctionGUI("MenuWindow/SingleButton", function()
	game:setWindowVisible("mapSelectionWindow",true)
	game:playAudioFromFile("media/audio/sound/junggle_btn103.wav", false, 1.0, {x=0.0, y=0.0, z=0.0})
	end)

game:bindFunctionGUI("MenuWindow/ExitButton", function()
	game:playAudioFromFile("media/audio/sound/junggle_btn103.wav", false, 1.0, {x=0.0, y=0.0, z=0.0})
	game:quit()
	end)

game:bindFunctionGUI("mapSelectionWindow/CancelButton", function()
	game:playAudioFromFile("media/audio/sound/junggle_btn103.wav", false, 1.0, {x=0.0, y=0.0, z=0.0})
	game:setWindowVisible("mapSelectionWindow",false)
	end)

game:bindFunctionGUI("mapSelectionWindow/SelectionButton1", function()
	game:playAudioFromFile("media/audio/sound/junggle_btn103.wav", false, 1.0, {x=0.0, y=0.0, z=0.0})
	
	game:setCursorVisible(false)
	game:setWindowVisible("mapSelectionWindow",false)
	game:setWindowVisible("MenuWindow",false)

	game:setWindowVisible("LoadingScreen",true)
	game:startGame("script/map1Scene.lua")
	game:setWindowVisible("LoadingScreen",false)
	end)

game:bindFunctionGUI("mapSelectionWindow/SelectionButton2", function()
	game:playAudioFromFile("media/audio/sound/junggle_btn103.wav", false, 1.0, {x=0.0, y=0.0, z=0.0})
	--game:playAudioFromFile(filaPath, looping, pitch, position)
	game:setAmbient(0.0,0.9,0.0)
	game:setCursorVisible(false)
	game:setWindowVisible("mapSelectionWindow",false)
	game:setWindowVisible("MenuWindow",false)

	game:setWindowVisible("LoadingScreen",true)
	game:startGame("script/pingvinmap.lua")
	game:setWindowVisible("LoadingScreen",false)
	end)

game:bindFunctionGUI("mapSelectionWindow/SelectionButton3", function()
	game:setCursorVisible(false)
	game:setWindowVisible("mapSelectionWindow",false)
	game:setWindowVisible("MenuWindow",false)

	game:setWindowVisible("LoadingScreen",true)
	game:startGame("script/AIScene.lua")
	game:setWindowVisible("LoadingScreen",false)
	game:playAudioFromFile("media/audio/sound/junggle_btn103.wav", false, 1.0, {x=0.0, y=0.0, z=0.0})
	game:setAmbient(0.0,0.0,0.9)
	end)

game:bindFunctionGUI("GameOverWindow/BacktoMenuButton", function()
	game:playAudioFromFile("media/audio/sound/junggle_btn103.wav", false, 1.0, {x=0.0, y=0.0, z=0.0})
	game:finishGame("script/menuScene.lua")
	game:setWindowVisible("GameOverWindow",false)
	game:setWindowVisible("MenuWindow",true)
	end)
